<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    function People(head, eyes, legs) {
      this.head = head
      this.eyes = eyes
      this.legs = legs
      this.say = function () { }
      this.eat = function () { }
    }

    function Man() {

    }

    // 相互指引
    Man.prototype = new People()
    Man.prototype.constructor = Man

    let str = new Man('1', '2', '3')
    console.log(str.head)

    console.log(Object.create(Man))
  </script>
</body>

</html>